import request from '@/utils/request';
import { Brand } from '../models/brand';

export async function list(): Promise<any> {
  return request('/brands');
}

export async function add(brand: Brand): Promise<any> {
  return request('/brands', {
    method: 'POST',
    data: brand,
  });
}

export async function remove(id: number): Promise<any> {
  return request(`/brands/${id}`, {
    method: 'DELETE',
  });
}
